import Vue from 'vue'
import VueRouter from 'vue-router'
import pages from '../pages'

Vue.use(VueRouter)

const comps = pages.pages
const routes = [{
        path: '/',
        name: 'index',
        component: comps['pages-intro']
    },
    {
        path: '/animal',
        name: 'animal',
        component: comps['pages-animal']
    },
    {
        path: '/plant',
        name: 'plant',
        component: comps['pages-plant']
    },
    {
        path: '/scene',
        name: 'scene',
        component: comps['pages-scene']
    },
    {
        path: '/learning',
        name: 'learning',
        component: comps['pages-learning']
    },
    {
        path: '/manage',
        name: 'manage',
        component: comps['pages-manage']
    }
]

const router = new VueRouter({
    routes
})

export default router